package ua.kma.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/test")
public class HelloWorldController{
 
 @RequestMapping(method = RequestMethod.GET)
 public String helloWorld(ModelMap model){
 
  //model = new ModelAndView("Hello");
  model.addAttribute("msg", "Hello world");
 
  return "hello";
 }
}